home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
time.z
/
time
Wrap
Text File
|
1998-10-20
|
10KB
|
265 lines
TTTTIIIIMMMMEEEE((((1111)))) TTTTIIIIMMMMEEEE((((1111))))
NNNNAAAAMMMMEEEE
time - time a command
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ttttiiiimmmmeeee [ ----ffff _f_o_r_m_a_t | ----llll | ----pppp ] command
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The _c_o_m_m_a_n_d is executed; after it exits, ttttiiiimmmmeeee prints resource usage
statistics to standard error. By default, this report includes the
elapsed time the command spent running, the CPU time spent in execution
of the command its reaped children, and the CPU time spent executing
system code by the command and its reaped children. Times are reported
in seconds.
ttttiiiimmmmeeee may be directed to produce other resource usage reports via command
line options. Additionally, the environment variable TTTTIIIIMMMMEEEE may be used to
establish a default report format. See below for a description of how
the contents of this report format specification are interpreted.
OOOOPPPPTTTTIIIIOOOONNNNSSSS
----ffff _f_o_r_m_a_t
Specify a resource usage report format. See below for a description
of how the contents of this string are interpreted.
----llll Use a long resource usage report that covers all resource usage
statistics that are collected.
----pppp Use the standard default resource usage report format:
real _e_l_a_p_s_e_d _t_i_m_e
user _u_s_e_r _C_P_U _t_i_m_e
sys _s_y_s_t_e_m _C_P_U _t_i_m_e
This is useful when the TTTTIIIIMMMMEEEE environment variable has been set to
establish a differnt default resource usage report format.
RRRREEEESSSSOOOOUUUURRRRCCCCEEEE UUUUSSSSAAAAGGGGEEEE RRRREEEEPPPPOOOORRRRTTTT FFFFOOOORRRRMMMMAAAATTTT SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
ttttiiiimmmmeeee may be directed to produce a customized resource usage report format
either via the ----ffff _f_o_r_m_a_t command line option or the TTTTIIIIMMMMEEEE environment
variable. In both cases the specified string is scanned for pppprrrriiiinnnnttttffff(3)-
like percent ("%") escape sequences. These sequences cause various
resource usage statistics to be output. Additionally several backslash
("\") escapes are also provided to help in outputting special characters.
All other non-escape characters are output as is. The set of escape
sequences recognized and their interpretations are:
\\\\\\\\ A backslash "\".
\\\\nnnn A newline. Note: if the last character output by the format string
is not a newline, one will be automatically appended.
PPPPaaaaggggeeee 1111
TTTTIIIIMMMMEEEE((((1111)))) TTTTIIIIMMMMEEEE((((1111))))
\\\\rrrr A carriage return.
\\\\tttt A tab.
\\\\_n_n_n The character corresponding to the octal number _n_n_n which may be up
to three digits.
%%%%%%%% A percent sign "%".
%%%%EEEE The elapsed time.
%%%%UUUU The user CPU time for _c_o_m_m_a_n_d and all of its children which were
_r_e_a_p_e_d by _c_o_m_m_a_n_d. (A child is reaped by calling one of the wwwwaaaaiiiitttt(2)
system calls.)
%%%%SSSS The system CPU time for _c_o_m_m_a_n_d and all of its children which were
_r_e_a_p_e_d
%%%%PPPP The percent CPU utilization followed by a percent sign "%". This is
calculated as (%%%%UUUU+%%%%SSSS)/%%%%EEEE*100. Note that this percentage can be
greater that 100% on multiprocessor systems. This can happen
because %%%%UUUU and %%%%SSSS include all the CPU time accumulated by _c_o_m_m_a_n_d
and its reaped children. Since those children can execute in
parallel on an MP system, CPU time can accumulate faster than
elapsed time ...
%%%%RRRR The number of page faults that resulted in a page being reclaimed
from the page cache.
%%%%FFFF The number of page faults that resulted in a page being read from
disk.
%%%%VVVV The sum of %%%%RRRR and %%%%FFFF.
%%%%wwww The number of voluntary context switches. These result from
explicit yields via calls to sssslllleeeeeeeepppp(2), ssssggggiiiinnnnaaaapppp(2), etc. and from
contention on a resource. High voluntary context switches and large
amounts of idle time often indicate an MP resource contention
problem.
%%%%cccc The number of involuntary context switches. These result from a
process being switched out at the end of its CPU time slice or being
preempted by a higher priority process.
%%%%WWWW The number of times the process was swapped. Non-zero values here
indicate that the system memory is probably desperately
oversubscribed.
%%%%CCCC The sum of %%%%wwww, %%%%cccc, and %%%%WWWW.
PPPPaaaaggggeeee 2222
TTTTIIIIMMMMEEEE((((1111)))) TTTTIIIIMMMMEEEE((((1111))))
%%%%IIII The number of disk input operations that were performed for the
process. Note that not all rrrreeeeaaaadddd(2) calls result in disk input
operations. If the requested data is found in the system buffer
cache, no disk input operation will be necessary.
%%%%OOOO The number of disk output operations that were performed for the
process. Note that this number is somewhat fuzzy since wwwwrrrriiiitttteeee(2)
calls are performed asynchronously by copying the requested output
data into the system buffer cache and scheduling the actual output
operation to occur at a later time. If the process exits before the
actual output operation, it won't be charged against the process.
%%%%???? The sum of %%%%IIII and %%%%OOOO.
%%%%kkkk The number of signals received by the process.
EEEEXXXXIIIITTTT SSSSTTTTAAAATTTTUUUUSSSS
If the _c_o_m_m_a_n_d is invoked, the exit status of ttttiiiimmmmeeee will be the exit
status of _c_o_m_m_a_n_d. ttttiiiimmmmeeee will exit with an exit status of 1-125 if an
error occurred in the ttttiiiimmmmeeee command itself. An exit status of 126 will be
returned if the _c_o_m_m_a_n_d specified was found but could not be invoked. If
the _c_o_m_m_a_n_d could not be found, the exit status will be 127.
EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
TTTTIIIIMMMMEEEE Used to establish a default resource usage report format. The ----pppp
option may be used to force the built in default.
NNNNOOOOTTTTEEEESSSS
Users of ccccsssshhhh(1), ttttccccsssshhhh(1), and kkkksssshhhh(1) (and most other shells) beware:
these shells have builtin ttttiiiimmmmeeee commands which perform the same function
as ttttiiiimmmmeeee(1) but print the results in a different format. Also note that
the ttttiiiimmmmeeee commands in ccccsssshhhh and ttttccccsssshhhh have similar, but not identical output
formatting capability.
Note that timing shell pipe lines may not produce the results that you
think they should. In particular, the Bourne and Korn shells both return
as soon as the last command in a pipe line terminates. For instance,
note that in the second example below, ////bbbbiiiinnnn////ttttiiiimmmmeeee outputs a real time of
approximately 5 seconds even though the first command in the pipe line
won't terminate for another 5 seconds.
% /bin/time /bin/sh -c 'sleep 5 | sleep 10'
real 10.100
user 0.010
sys 0.040
% /bin/time /bin/sh -c 'sleep 10 | sleep 5'
real 5.060
user 0.010
sys 0.040
PPPPaaaaggggeeee 3333
TTTTIIIIMMMMEEEE((((1111)))) TTTTIIIIMMMMEEEE((((1111))))
SSSSEEEEEEEE AAAALLLLSSSSOOOO
ccccsssshhhh(1), ttttccccsssshhhh(1), ksh(1), ggggeeeettttrrrruuuussssaaaaggggeeee(2), ppppeeeerrrrffffeeeexxxx(1), ssssssssrrrruuuunnnn(1)*
* The ssssssssrrrruuuunnnn(1) command is part of the SSSSppppeeeeeeeeddddSSSShhhhoooopppp image in the IRIXTM
Development Option.
PPPPaaaaggggeeee 4444